package com.mybatis.config.dao.mapper;

import com.mybatis.mybatis.bean.Customer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

//所有的事情不用再管
//创建这个接口的实现类
@Mapper
//和CustomerMapper.xml对应起来
public interface CustomerMapper {
    //方法名对应id  入参paramterType 返回类型：resultType
    Customer queryCustomerById(int id);

    List<Customer> queryCustomer();

    int addCustomer(String userName, String jobs, String phone);

    int modifyCustomer(int id, String userName, String jobs, String phone);

    int delCustomer(int id);

    List<Customer> queryFuzzCustomer(String userName);

    List<Customer> queryCustomerByMany(String userName, String jobs, String phone);

    List<Customer> queryCustomerByName(String userName, String jobs, String phone);

    List<Customer> selectCustomerByIds(int[] ids);

    List<Customer> selectCustomerByCustomer(String userName, String jobs, String phone);

    List<Customer> selectCustomerByTrim(String userName, String jobs, String phone);

    int updateCustomer(int id, String userName, String jobs, String phone);
}
